﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Data;
using DongleManage.Model.BaseClass;

namespace  DongleManage.Model.EssentialData
{

		
	/// <summary>
	///  表'TestMaster'的实体表示.
	/// </summary>
	/// <remarks>
	/// 该实体由工具生成，尽量不要手动修改
	/// </remarks>
	[DataContract]
	public partial class TestMasterEntity :BaseEntity
	{
		#region 属性、变量声明
		#region 主属性 --对应数据表主键
		/// <summary>			
		/// TransactionNumber : 
		/// </summary>
		/// <remarks>表TestMaster主键</remarks>
		[DisplayName("")]
		[DataMember]
		public Int32 TransactionNumber
        {
            get;
            set;
        }
		#endregion
		
		#region 属性
		
		/// <summary>
		/// TestNumber : 
		/// </summary>
        [DisplayName("")]
        [Required(ErrorMessage = "不允许为空!")]
        
		[DataMember]
		public Int64 TestNumber
        {
            get;
            set;
        }
		
		/// <summary>
		/// CustomerID : 
		/// </summary>
        [DisplayName("")]
        
		[DataMember]
		public Int32? CustomerID
        {
            get;
            set;
        }
		
		/// <summary>
		/// CoachID : 
		/// </summary>
        [DisplayName("")]
        
		[DataMember]
		public Int32? CoachID
        {
            get;
            set;
        }
		
		/// <summary>
		/// InUserID : 
		/// </summary>
        [DisplayName("")]
        [Required(ErrorMessage = "不允许为空!")]
        
		[DataMember]
		public Int32 InUserID
        {
            get;
            set;
        }
		
		/// <summary>
		/// InDate2 : 
		/// </summary>
        [DisplayName("")]
        [Required(ErrorMessage = "不允许为空!")]
        
		[DataMember]
		public DateTime InDate
        {
            get;
            set;
        }
		
		/// <summary>
		/// EditUserID : 
		/// </summary>
        [DisplayName("")]
        [Required(ErrorMessage = "不允许为空!")]
        
		[DataMember]
		public Int32 EditUserID
        {
            get;
            set;
        }
		
		/// <summary>
		/// EditDate : 
		/// </summary>
        [DisplayName("")]
        
		[DataMember]
		public DateTime? EditDate
        {
            get;
            set;
        }
		#endregion

		#endregion 属性、变量声明
		
	    public TestMasterEntity()
        {
            TransactionNumber = (int)0;
            TestNumber = (long)0;
            CustomerID = null;
            CoachID = null;
            InUserID = (int)0;
            InDate = DateTime.Now;
            EditUserID = (int)0;
            EditDate = null;
        }

        public TestMasterEntity(IDataReader dataReader):base(dataReader)
        {
            TransactionNumber = Convert.IsDBNull(dataReader["TransactionNumber"]) ? 0 : Convert.ToInt32(dataReader["TransactionNumber"]);
            TestNumber = Convert.IsDBNull(dataReader["TestNumber"]) ? 0 : Convert.ToInt64(dataReader["TestNumber"]);
            CustomerID = Convert.IsDBNull(dataReader["CustomerID"]) ? 0 : Convert.ToInt32(dataReader["CustomerID"]);
            CoachID = Convert.IsDBNull(dataReader["CoachID"]) ? 0 : Convert.ToInt32(dataReader["CoachID"]);
        }
	}
}
